package com.lishuang.test.org;

import com.lishuang.org.domain.Department;
import com.lishuang.org.service.IDepartmentService;
import com.lishuang.test.basic.SpringTest;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;


public class SpringTestDepartment extends SpringTest {

    @Autowired
    private IDepartmentService departmentService;

    @Test
    public void test1() throws Exception {
        departmentService.loadAll().forEach(System.out::println);
    }

    @Test
    public void test2() throws Exception {
        Department department = new Department();
        department.setName("小卖部");
        departmentService.save(department);
        System.out.println(department);
    }
}
